package com.gistone.commis.mapper;

import com.gistone.commis.entity.Community;
import com.gistone.commis.entity.Person;
import com.gistone.commis.query.QueryPerson;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PersonMapper {
    int deleteByPrimaryKey(Integer personId);

    int insert(Person record);

    int insertSelective(Person record);

    Person selectByPrimaryKey(Integer personId);

    int updateByPrimaryKeySelective(Person record);

    int updateByPrimaryKey(Person record);


    List<Person> selectSelective(QueryPerson record);
    @Select("SELECT  max(number) FROM tb_person ")
    Integer getMaxNumber();


    @Select("SELECT * FROM tb_person where is_delete = 0 and community_id != 1 ")
    List<Person> selectPersonWithout1();
}